Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging #44

Closed
wants to merge 2 commits into from
Closed

Packaging #44

wants to merge 2 commits into from

Conversation

femtotrader
Copy link
Contributor

@femtotrader femtotrader commented Jun 22, 2016

Might help to fix
#43

Tests are renamed to be automatically discovered by nosetests

See

$ nosetests -s -v
Purchase/sell multiple lots of AMZN and GOOG ... ok
Tests the "_convert_fill_to_portfolio_update" method ... ok
Tests the "_create_order_from_signal" method ... ok
Tests the "on_signal" method as a basic sanity check. ... ok
Tests the "_place_orders_onto_queue" method ... ok
After the subsequent sale, carry out two more sells/shorts ... ok
After the subsequent purchase, carry out two more buys/longs ... ok
Tests that the 'get_best_bid_ask' method produces the ... Bid/ask values for ticker %s are not available from the PriceHandler.
ok
The initialisation of the class will open the three ... ok
Tests the 'subscribe_ticker' and 'unsubscribe_ticker' ... Could not subscribe ticker GOOG as is already subscribed.
Could not subscribe ticker XOM as no data CSV found for pricing.
ok
Purchase/sell multiple lots of AMZN, GOOG ... ok

----------------------------------------------------------------------
Ran 11 tests in 5.130s

OK

Examples are renamed in order to avoid confusion with unit tests

An other unit test will be necessary to ensure that examples run correctly (ToDo).
A SP500TR sample is necessary

There is also a .travis.yml file (taken from pandas_datareader) so enabling should be possible (some tweaking such as requirement will be necessary to ensure CI is passing)
see http://stackoverflow.com/questions/14399534/how-can-i-reference-requirements-txt-for-the-install-requires-kwarg-in-setuptool

PEP8 checking is also done (using flake8)

@femtotrader
Copy link
Contributor Author

@femtotrader
Copy link
Contributor Author

SP500TR.csv have been add to data (for testing purpose).
This file have been downloaded thanks to a project in which I'm involved (pandas_datareader)

Examples have been slightly modified to be both examples and unit tests
(see tests/test_examples.py)

So now I consider this PR ready to be merged

Pinging @mhallsmoore @ryankennedyio

It's important to merge it because it will help now to improve qstrader ensuring that we don't break anything when merging code.

If we have a look at previous commits, we can see that some examples are broken (indent, ...) or that these examples can't be run easily (missing data for a ticker).

With this PR, we should now be able to avoid this and we can expect very good improvements thanks to @ryankennedyio experiments that could be add is a second step.

@femtotrader femtotrader mentioned this pull request Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant